package com.demo.androidgame.samgukji_hit;

import com.demo.androidgame.fx.gl.Animation;
import com.demo.androidgame.fx.gl.Texture;
import com.demo.androidgame.fx.gl.TextureRegion;
import com.demo.androidgame.fx.impl.GLGame;

public class Assets {

	public static Texture background;
	public static TextureRegion backgroundRegion;

	public static Texture selectMenu;
	public static TextureRegion newGame;
	public static TextureRegion loadGame;
	public static TextureRegion options;

	public static Texture mark;
	public static TextureRegion markRegion;
	public static Texture whathow;
	public static TextureRegion whathowRegion;

	public static Texture title;
	public static TextureRegion titleRegion;

	public static Texture next_button;
	public static TextureRegion next_buttonRegion;
	public static Texture skip_button;
	public static TextureRegion skip_buttonRegion;
	public static Texture text_box;
	public static TextureRegion text_box1;
	public static TextureRegion text_box2;
	public static TextureRegion text_box3;
	public static Texture sam_story;
	public static TextureRegion sam_story1;
	public static TextureRegion sam_story2;
	public static TextureRegion sam_story3;

	// SelectScreen
	public static Texture select_bar;
	public static TextureRegion select_red;
	public static TextureRegion select_green;
	public static TextureRegion select_blue;

	public static Texture mujang;
	public static TextureRegion mujang1;
	public static TextureRegion mujang2;
	public static TextureRegion mujang3;
	public static TextureRegion mujang4;
	public static TextureRegion mujang5;
	public static TextureRegion mujang6;
	public static Texture select_text;
	public static TextureRegion select_textRegion;

	// NationScreen
	public static Texture nation_bar;
	public static TextureRegion nation_red;
	public static TextureRegion nation_green;
	public static TextureRegion nation_blue;
	public static Texture next_button2;
	public static TextureRegion next_button2Region;
	public static Texture mujang2_2;
	public static TextureRegion mujang2_2Region;
	public static Texture mujang3_2;
	public static TextureRegion mujang3_2Region;
	public static Texture mujang4_2;
	public static TextureRegion mujang4_2Region;

	// UnitScreen
	public static Texture ok_cancel_bt;
	public static TextureRegion ok_btRegion;
	public static TextureRegion cancelbtRegion;
	
	//HeroStageRenderer
	public static Texture HeroStageBackgorund;
	public static TextureRegion heroStageBackgroundRegion;
	
	//Hero
	public static Texture Hero;
	public static Animation heroAnimation;
	public static Animation heroMoveAnimation;
	public static Animation heroFireAnimation;
	public static Animation heroMove_FireAnimation;
	//keypad
	public static Texture keypad;
	public static TextureRegion keypadRegion;
	public static Texture knob;
	public static TextureRegion knobRegion;
	
	public static Texture joystickbg;
	public static TextureRegion joystickbgRegion;
	public static Texture joystick;
	public static TextureRegion joystickRegion;

	//FireButton
	public static Texture Fire_Button;
	public static TextureRegion left_firebt;
	public static TextureRegion right_firebt;
	//Arrow_of_Tunder
	public static Texture Thunder_Arrow;
	public static Animation Thunder_Arrow_Animation;
	
	// 로드게임 배경
	public static Texture mLoadBackground;
	public static TextureRegion mLoadBackRegion;
	// 로드게임 메뉴
	public static Texture mLoadMenu;
	public static TextureRegion mMainMenuRegion;
	public static TextureRegion mSaveMenuRegion;
	public static TextureRegion mUpgradeMenuRegion;
	public static TextureRegion mStartMenuRegion;
	public static Texture mChangeMenu;
	public static TextureRegion mHeroMenuRegion;
	public static TextureRegion mMusicMenuRegion;
	// 스테이지 메뉴
	public static Texture mStageMenu;
	public static TextureRegion mStageMenuRegion;
	public static Texture mMusicStageMenu;
	public static TextureRegion mMusicStageMenuRegion;

	// 엑트 메뉴
	public static Texture mActSelectMenu;
	public static TextureRegion mActSelectMenuRegion;
	// 엑트 타이틀
	public static Texture mActTitle;
	public static TextureRegion mActTitleOne;
	public static TextureRegion mActTitleTwo;
	public static TextureRegion mActTitleThree;
	public static TextureRegion mActTitleFour;
	public static TextureRegion mActTitleFive;
	public static TextureRegion mActTitleSix;
	//뮤직스테이지 배경
	public static Texture mMusicBack;
	public static TextureRegion mMusicBackRegion;
	//뮤직스테이지 성
	public static Texture mSung;
	public static TextureRegion mSungRegion;
	//뮤직스테이지 병사1
	public static Texture mUnit01;
	public static TextureRegion mUnitRegion01;
	
	public static Texture mMusicUnit;
	public static Animation mMusicUnitAni;
	//뮤직스테이지 화살
	public static Texture mBow01;
	public static Animation mBowAni01;
	//뮤직스테이지 음악노트
	public static Texture mMusicNote;
	public static Animation mMusicNoteAni;

	//public static int clearActNumber;
	public static int clearHeroStage; // 히어로 모드 스테이지 저장
	public static int clearMusicStage; // 뮤직 모드 스테이지 저장
	
	public static int actNumber;

	public static int HeroNo1; // 영웅 번호
	public static int HeroNo2;
	public static int HeroNo3;
	public static int HeroNo4;
	public static int HeroNo5;
	public static int HeroNo6;

	public static void load(GLGame game) {
		background = new Texture(game, "mainmenuBack.png");
		backgroundRegion = new TextureRegion(background, 0, 0, 800, 480);

		mark = new Texture(game, "mark9.png");
		markRegion = new TextureRegion(mark, 0, 0, 250, 250);
		whathow = new Texture(game, "whathow.png");
		whathowRegion = new TextureRegion(whathow, 0, 0, 400, 120);

		title = new Texture(game, "title.png");
		titleRegion = new TextureRegion(title, 0, 0, 600, 200);

		// SenarioScreen
		next_button = new Texture(game, "next_button.png");
		next_buttonRegion = new TextureRegion(next_button, 0, 0, 100, 40);
		skip_button = new Texture(game, "skip_button.png");
		skip_buttonRegion = new TextureRegion(skip_button, 0, 0, 100, 40);
		text_box = new Texture(game, "text_box.png");
		text_box1 = new TextureRegion(text_box, 0, 0, 600, 100);
		text_box2 = new TextureRegion(text_box, 0, 100, 600, 100);
		text_box3 = new TextureRegion(text_box, 0, 200, 600, 100);

		sam_story = new Texture(game, "sam_story.png");
		sam_story1 = new TextureRegion(sam_story, 0, 0, 600, 350);
		sam_story2 = new TextureRegion(sam_story, 0, 350, 600, 350);
		sam_story3 = new TextureRegion(sam_story, 0, 700, 600, 350);

		// SelectScreen
		select_bar = new Texture(game, "select_bar.png");
		select_red = new TextureRegion(select_bar, 0, 0, 240, 380);
		select_green = new TextureRegion(select_bar, 242, 0, 238, 380);
		select_blue = new TextureRegion(select_bar, 480, 0, 240, 380);

		mujang = new Texture(game, "mujang.png");
		mujang1 = new TextureRegion(mujang, 0, 0, 120, 150);
		mujang2 = new TextureRegion(mujang, 120, 0, 120, 150);
		mujang3 = new TextureRegion(mujang, 240, 0, 120, 150);
		mujang4 = new TextureRegion(mujang, 360, 0, 120, 150);
		mujang5 = new TextureRegion(mujang, 480, 0, 120, 150);
		mujang6 = new TextureRegion(mujang, 600, 0, 120, 150);

		select_text = new Texture(game, "select_text.png");
		select_textRegion = new TextureRegion(select_text, 0, 0, 400, 80);

		// NationScreen
		nation_bar = new Texture(game, "nation_bar.png");
		nation_red = new TextureRegion(nation_bar, 0, 0, 780, 460);
		nation_green = new TextureRegion(nation_bar, 0, 463, 780, 457);
		nation_blue = new TextureRegion(nation_bar, 0, 920, 780, 460);
		next_button2 = new Texture(game, "next_button2.png");
		next_button2Region = new TextureRegion(next_button2, 0, 0, 100, 40);

		// UnitScreen
		ok_cancel_bt = new Texture(game, "ok_cancel_button.png");
		ok_btRegion = new TextureRegion(ok_cancel_bt, 0, 0, 100, 40);
		cancelbtRegion = new TextureRegion(ok_cancel_bt, 0, 40, 100, 40);
		mujang2_2 = new Texture(game, "mujang2_2.png");
		mujang2_2Region = new TextureRegion(mujang2_2, 0, 0, 200, 400);
		mujang3_2 = new Texture(game, "mujang3_2.png");
		mujang3_2Region = new TextureRegion(mujang3_2, 0, 0, 200, 400);
		mujang4_2 = new Texture(game, "mujang4_2.png");
		mujang4_2Region = new TextureRegion(mujang4_2, 0, 0, 200, 400);
		
		//HeroStageRenderer
		HeroStageBackgorund = new Texture(game, "load11.png");
		heroStageBackgroundRegion = new TextureRegion(HeroStageBackgorund, 0, 0, 800, 480);
		//Hero
		Hero = new Texture(game, "60637.png");
		heroAnimation = new Animation(0.2f, new TextureRegion(Hero, 1100, 990, 116, 140)
//											,new TextureRegion(Hero, 1216, 990, 116, 140)
		);
		heroMoveAnimation = new Animation(0.2f, new TextureRegion(Hero, 1100, 990, 116, 140),
												new TextureRegion(Hero, 1216, 990, 116, 140),
												new TextureRegion(Hero, 1336, 990, 120, 140),
												new TextureRegion(Hero, 1458, 990, 120, 140),
												new TextureRegion(Hero, 1585, 990, 120, 140),
												new TextureRegion(Hero, 1705, 990, 120, 140),
												new TextureRegion(Hero, 1838, 990, 120, 140),
												new TextureRegion(Hero, 1958, 990, 120, 140),
												new TextureRegion(Hero, 2078, 990, 120, 140),
												new TextureRegion(Hero, 2198, 990, 120, 140));
		heroFireAnimation = new Animation(0.2f, new TextureRegion(Hero, 576, 1870, 128, 128),
												new TextureRegion(Hero, 722, 1870, 128, 128),
												new TextureRegion(Hero, 852, 1870, 128, 128),
												new TextureRegion(Hero, 1002, 1870, 128, 128),
												new TextureRegion(Hero, 1132, 1870, 128, 128),
												new TextureRegion(Hero, 1274, 1870, 128, 128),
												new TextureRegion(Hero, 1566, 1870, 128, 128),
												new TextureRegion(Hero, 1856, 1870, 128, 128),
												new TextureRegion(Hero, 1996, 1870, 128, 128));
		heroMove_FireAnimation = new Animation(0.2f, new TextureRegion(Hero, 2078, 990, 120, 140),
												new TextureRegion(Hero, 2198, 990, 120, 140));
		//Keypad
		keypad = new Texture(game, "onscreen_control_base.png");
		keypadRegion = new TextureRegion(keypad, 0, 0, 128, 128);
		knob = new Texture(game, "onscreen_control_knob.png");
		knobRegion = new TextureRegion(knob, 0, 0, 64, 64);
		joystickbg = new Texture(game, "joystick_bg.png");
		joystickbgRegion = new TextureRegion(joystickbg, 0, 0, 90, 90);
		joystick = new Texture(game, "joystick.png");
		joystickRegion = new TextureRegion(joystick, 0, 0, 53, 53);
		
		//FireButton
		Fire_Button = new Texture(game, "Fire2.png");
		left_firebt = new TextureRegion(Fire_Button, 0, 0, 125, 100);
		right_firebt = new TextureRegion(Fire_Button, 125, 0, 125, 100);
		//Arrow_of_Tunder
		Thunder_Arrow = new Texture(game, "THUNDG1_0000.png");
		Thunder_Arrow_Animation = new Animation(0.2f, 
				new TextureRegion(Thunder_Arrow, 0, 0, 128, 64),
				new TextureRegion(Thunder_Arrow, 128, 0, 128, 64),
				new TextureRegion(Thunder_Arrow, 256, 0, 128, 64),
				new TextureRegion(Thunder_Arrow, 384, 0, 128, 64),
				new TextureRegion(Thunder_Arrow, 0, 64, 128, 64),
				new TextureRegion(Thunder_Arrow, 128, 64, 128, 64),
				new TextureRegion(Thunder_Arrow, 256, 64, 128, 64),
				new TextureRegion(Thunder_Arrow, 384, 64, 128, 64));
		
		// 로드게임 배경화면
		mLoadBackground = new Texture(game, "changeMap.png");
		mLoadBackRegion = new TextureRegion(mLoadBackground, 0, 0, 800, 400);
		// 로드게임 메뉴
		mLoadMenu = new Texture(game, "loadMenu.png");
		mMainMenuRegion = new TextureRegion(mLoadMenu, 0, 0, 110, 38);
		mSaveMenuRegion = new TextureRegion(mLoadMenu, 110, 0, 110, 38);
		mUpgradeMenuRegion = new TextureRegion(mLoadMenu, 220, 0, 110, 38);
		mStartMenuRegion = new TextureRegion(mLoadMenu, 330, 0, 110, 38);
		mChangeMenu = new Texture(game, "change.png");
		mHeroMenuRegion = new TextureRegion(mChangeMenu, 15, 7, 92, 92);
		mMusicMenuRegion = new TextureRegion(mChangeMenu, 107, 7, 92, 92);
		// 스테이지 메뉴
		mStageMenu = new Texture(game, "stage.png");
		mStageMenuRegion = new TextureRegion(mStageMenu, 0, 0, 80, 37);
		mMusicStageMenu = new Texture(game, "musicStage.png");
		mMusicStageMenuRegion = new TextureRegion(mStageMenu, 0, 0, 80, 37);
		// 엑트 메뉴
		mActSelectMenu = new Texture(game, "actBack.png");
		mActSelectMenuRegion = new TextureRegion(mActSelectMenu, 0, 0, 800, 480);
		// 엑트 타이틀
		mActTitle = new Texture(game, "actTitle.png");
		mActTitleOne = new TextureRegion(mActTitle, 0, 0, 800, 40);
		mActTitleTwo = new TextureRegion(mActTitle, 0, 55, 800, 40);
		mActTitleThree = new TextureRegion(mActTitle, 0, 110, 800, 40);
		mActTitleFour = new TextureRegion(mActTitle, 0, 165, 800, 40);
		mActTitleFive = new TextureRegion(mActTitle, 0, 220, 800, 40);
		mActTitleSix = new TextureRegion(mActTitle, 0, 275, 800, 40);
		//뮤직스테이지 배경
		mMusicBack = new Texture(game, "musicBack.png");
		mMusicBackRegion = new TextureRegion(mMusicBack, 0, 0, 800, 400);
//		//뮤직스테이지 성
//		mSung = new Texture(game, "sung2.png");
//		mSungRegion = new TextureRegion(mSung, 0, 0, 300, 178);
		//뮤직스테이지 병사
//		mUnit01 = new Texture(game, "unit01.png");
//		mUnitRegion01 = new TextureRegion(mUnit01, 0, 0, 100, 60);
		
		mMusicUnit = new Texture(game, "musicUnit.png");
		mMusicUnitAni = new Animation(1, new TextureRegion(mMusicUnit, 0, 28, 98, 74),
																new TextureRegion(mMusicUnit, 101, 28, 98, 74),
																new TextureRegion(mMusicUnit, 202, 28, 98, 74));
		//뮤직스테이지 화살
		mBow01 = new Texture(game, "bow01.png");
		mBowAni01 = new Animation(1, new TextureRegion(mBow01, 0, 0, 55, 12));
		//뮤직스테이지 음악 노트
		mMusicNote = new Texture(game, "musicNote.png");
		mMusicNoteAni = new Animation(1, new TextureRegion(mMusicNote, 0, 0, 54, 54));

		clearHeroStage = 111;
		clearMusicStage = 211;
		//clearActNumber = 1;
		actNumber = 1; // 액트 선택 번호 저장

		HeroNo1 = 311;
		HeroNo2 = 312;
		HeroNo3 = 313;
		HeroNo4 = 314;
		HeroNo5 = 315;
		HeroNo6 = 316;

	}

	public static void reload() {
		background.reload();
		selectMenu.reload();
		mark.reload();
		whathow.reload();
		next_button.reload();
		skip_button.reload();
		text_box.reload();
		sam_story.reload();
		select_bar.reload();
		mujang.reload();
		select_text.reload();
		nation_bar.reload();
		ok_cancel_bt.reload();
		HeroStageBackgorund.reload();
		next_button2.reload();
		Hero.reload();
		mujang2_2.reload();
		mujang3_2.reload();
		mujang4_2.reload();
		keypad.reload();
		knob.reload();
		joystick.reload();
		joystickbg.reload();
		Fire_Button.reload();
		Thunder_Arrow.reload();

		/////////////////////////////////////////////
		mLoadBackground.reload();
		mLoadMenu.reload();
		mChangeMenu.reload();
		mStageMenu.reload();
		mMusicStageMenu.reload();
		mActSelectMenu.reload();
		mActTitle.reload();
		mMusicBack.reload();
		mMusicUnit.reload();
		mBow01.reload();
		mMusicNote.reload();

	}

}
